package com.huawei.gamebox.service.welfare.common.card;

import android.content.Context;
import android.view.View;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.gamebox.service.common.cardkit.card.BaseGsCard;
import com.huawei.gamebox.service.welfare.common.bean.AbsWithTitleCardBean;
import java.util.ArrayList;
import java.util.List;
import o.cgz;

public abstract class AbsWithTitleCard extends BaseGsCard {
    private GsTitleCard ˊ = null;
    private List<BaseGsCard> ˎ = new ArrayList();

    public /* synthetic */ cgz ˏ(View view) {
        return ˊ(view);
    }

    public AbsWithTitleCard(Context context) {
        super(context);
    }

    public GsTitleCard ˊ() {
        return this.ˊ;
    }

    public void ˊ(GsTitleCard gsTitleCard) {
        this.ˊ = gsTitleCard;
    }

    public BaseGsCard ˊ(View view) {
        ʽ(view);
        return this;
    }

    public BaseGsCard ˋ(int i) {
        if (this.ˎ == null || i < 0 || i >= this.ˎ.size()) {
            return null;
        }
        return (BaseGsCard) this.ˎ.get(i);
    }

    public void ॱ(BaseGsCard baseGsCard) {
        if (baseGsCard != null) {
            this.ˎ.add(baseGsCard);
        }
    }

    public void ˋ() {
        this.ˎ.clear();
    }

    public int ˎ() {
        return this.ˎ.size();
    }

    public void ˏ(CardBean cardBean) {
        if (cardBean instanceof AbsWithTitleCardBean) {
            cardBean = (AbsWithTitleCardBean) cardBean;
            if (this.ˊ != null) {
                this.ˊ.ˏ(cardBean);
            }
        }
    }
}
